package com.xzuf.core.ui;

import javax.swing.JToolBar;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author xzgf
 * @since 2008-7-12
 * @version 1.0
 */
public class ToolBarUI {
	
	private static final Log logger = LogFactory.getLog(ToolBarUI.class);

	public JToolBar iniToolBar() {
		logger.debug("Begin initialize JToolbar...");
		JToolBar toolBar = new JToolBar();
		toolBar.setRollover(true);
		toolBar.setFloatable(true);
		
		UIAction[] actions = ActionManager.getManagerActions();
		for(int i=0;i<actions.length;i++) {
			toolBar.add(actions[i]);
		}
		toolBar.addSeparator();
		UIAction[] actions2 = ActionManager.getHelpActions();
		for(int i=0;i<actions2.length;i++) {
			toolBar.add(actions2[i]);
		}
		toolBar.addSeparator();
		logger.debug("End initialize JToolBar..");
		return toolBar;
	}
}
